#include "StdAfx.h"
#include "KnowledgeCreditLoanModel.h"


CKnowledgeCreditLoanModel::CKnowledgeCreditLoanModel(void)
{
	m_id = 0;
}

CKnowledgeCreditLoanModel::~CKnowledgeCreditLoanModel(void)
{
}

void CKnowledgeCreditLoanModel::parseFromJson(Json::Value& jsonData)
{
	if (!jsonData["id"].isNull())
	{
		m_id = jsonData["id"].asInt();
	}
	CUtils::getJsonStringField(jsonData, "name", m_name);
	CUtils::getJsonStringField(jsonData, "needCondition", m_needCondition);
	CUtils::getJsonStringField(jsonData, "needMaterial", m_needMaterial);
	CUtils::getJsonStringField(jsonData, "loanAmount", m_loanAmount);
	CUtils::getJsonStringField(jsonData, "extendLoanCost", m_extendLoanCost);
	CUtils::getJsonStringField(jsonData, "interestRate", m_interestRate);
	CUtils::getJsonStringField(jsonData, "loanDeadline", m_loanDeadline);
	CUtils::getJsonStringField(jsonData, "beforeRepayment", m_beforeRepayment);
	CUtils::getJsonStringField(jsonData, "extendLoanTm", m_extendLoanTm);
	CUtils::getJsonStringField(jsonData, "credit", m_credit);
	CUtils::getJsonStringField(jsonData, "liabilities", m_liabilities);
	CUtils::getJsonStringField(jsonData, "memo", m_memo);
	CUtils::getJsonStringField(jsonData, "shortInfo", m_shortInfo);
	CUtils::getJsonStringField(jsonData, "cityName", m_cityName);
}


